<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="schoolInfoDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='schoolInfoDetail.heading'/>"/>
</head>

<s:form id="schoolInfoForm" action="saveSchoolInfo" method="post" validate="true">
    <li style="display: none">
        <s:hidden key="schoolInfo.id"/>
    </li>
    <s:textfield key="schoolInfo.accommodation" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.applyCost" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.applyDifficulty" required="true" maxlength="255" cssClass="text medium"/>
    <s:textfield key="schoolInfo.applyEndTime" required="true" maxlength="19" cssClass="text medium"/>
    <s:textfield key="schoolInfo.applyUrl" required="false" maxlength="256" cssClass="text medium"/>
    <s:textfield key="schoolInfo.cv" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.description" required="false" maxlength="1024" cssClass="text medium"/>
    <s:textfield key="schoolInfo.essay" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.gre" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.hasScholarship" required="true" maxlength="255" cssClass="text medium"/>
    <s:textfield key="schoolInfo.hotMajor" required="false" maxlength="64" cssClass="text medium"/>
    <s:textfield key="schoolInfo.nature" required="true" maxlength="255" cssClass="text medium"/>
    <s:textfield key="schoolInfo.otherCost" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.phone" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.ps" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.rl" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.sat" required="false" maxlength="16" cssClass="text medium"/>
    <!-- todo: change this to read the identifier field from the other pojo -->
    <s:select name="schoolInfo.school.id" list="schoolList" listKey="id" listValue="id"></s:select>
    <s:textfield key="schoolInfo.sendAddress" required="false" maxlength="512" cssClass="text medium"/>
    <s:textfield key="schoolInfo.sorted" required="true" maxlength="255" cssClass="text medium"/>
    <s:textfield key="schoolInfo.toefl" required="false" maxlength="16" cssClass="text medium"/>
    <s:textfield key="schoolInfo.tuition" required="false" maxlength="16" cssClass="text medium"/>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty schoolInfo.id}">
            <s:submit cssClass="button" method="delete" key="button.delete"
                onclick="return confirmDelete('SchoolInfo')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("schoolInfoForm"));
</script>
